﻿@using XHouse.Model.Aparatos
@model XHouse.Model.Modulo

@{
    ViewBag.Title = "Details";
}

<h2>Details</h2>

<fieldset>
    <legend>Modulo</legend>

    <div class="display-label">
         @Html.DisplayNameFor(model => model.Nombre)
    </div>
    <div class="display-field">
        @Html.DisplayFor(model => model.Nombre)
    </div>

    <div class="display-label">
         @Html.DisplayNameFor(model => model.Descripcion)
    </div>
    <div class="display-field">
        @Html.DisplayFor(model => model.Descripcion)
    </div>

    <div class="display-label">
         @Html.DisplayNameFor(model => model.Direccion)
    </div>
    <div class="display-field">
        @Html.DisplayFor(model => model.Direccion)
    </div>

    <div class="display-label">
         @Html.DisplayNameFor(model => model.Ubicacion)
    </div>
    <div class="display-field">
        @Html.DisplayFor(model => model.Ubicacion)
    </div>
    
    <table class="table table-striped">
        <thead>
            <tr>
                <td>Aparato</td>
                <td>Número</td>
                <td>Tipo de Aparato</td>
                <td>Habilitado</td>
            </tr>
        </thead>
        <tbody>
            @foreach(var a in Model.Aparatos)
            {
                <tr>
                    <td>@a.Nombre</td>
                    <td>@a.Numero</td>
                    <td>@a.TipoAparato.Nombre</td>
                    <td>@(a.Habilitado ? "Si" : "No")</td>
                </tr>
            }
        </tbody>
    </table>
</fieldset>
<p>
    @Html.ActionLink("Edit", "Edit", new { id=Model.Id }) |
    @Html.ActionLink("Back to List", "Index")
</p>
